-- alter table jms_dm.dm_fr_tyd_departure_transfer_timely_route_summary_dt
--     set tblproperties ('external.table.purge' = 'true');
-- drop table jms_dm.dm_fr_tyd_departure_transfer_timely_route_summary_dt;
CREATE EXTERNAL TABLE  jms_dm.dm_fr_tyd_departure_transfer_timely_route_summary_dt
(
    start_code                       string comment '始发地发件中心编码',
    start_name                       string comment '始发地发件中心名称',
    order_source_code                string comment '订单来源编码',
    order_source_name                string comment '订单来源名称',
    center_type                      string comment '中心类型1始发2中转',
    start_agent_code                 string comment '发件代理区编码',
    start_agent_name                 string comment '发件代理区名称',
    send_account                     int comment '发件票数',
    route_lack_account               int comment '静态路由缺失票数',
    transfer_intime_account          int comment '转运及时票数',
    transfer_intime_rate             double comment '出港转运及时率',
    without_arrival_account          int comment '无到达时间票数',
    error_send_account               int comment '错发票数',
    opp_delay_account                int comment '操作延误票数',
    send_delay_account               int comment '发车晚点票数',
    shipment_delay_account           int comment '任务单问题票数',
    stop_delay_account               int comment '经停点问题票数',
    all_line_transfer_intime_account int comment '全链路转运及时票数',
    all_line_transfer_intime_rate    double comment '全链路转运及时率',
    shipment_error_account           int comment '任务单错用票数',
    mage_region_code                 string comment '管理大区编码',
    mage_region_name                 string comment '管理大区名称',
    date_time                        string comment '日期'
)
    COMMENT 'T-1出港转运及时率-汇总兔优达'
    PARTITIONED BY ( dt STRING COMMENT ' 时间')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_fr_tyd_departure_transfer_timely_route_summary_dt'
;